package com.shioirikukuri.service.impl;

import com.shioirikukuri.entity.UserMemberLevel;
import com.shioirikukuri.mapper.UserMemberLevelMapper;
import com.shioirikukuri.service.IUserMemberLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserMemberLevelServiceImpl implements IUserMemberLevelService {
	@Autowired
	private UserMemberLevelMapper userMemberLevelMapper;

	@Override
	public void createUserMemberLevel(UserMemberLevel userMemberLevel) {
		userMemberLevelMapper.insertUserMemberLevel(userMemberLevel);
	}

	@Override
	public UserMemberLevel getUserMemberLevelById(Long id) {
		return userMemberLevelMapper.selectUserMemberLevelById(id);
	}

	@Override
	public List<UserMemberLevel> getAllUserMemberLevels() {
		return userMemberLevelMapper.selectAllUserMemberLevels();
	}

	@Override
	public void updateUserMemberLevel(UserMemberLevel userMemberLevel) {
		userMemberLevelMapper.updateUserMemberLevel(userMemberLevel);
	}

	@Override
	public void deleteUserMemberLevelById(Long id) {
		userMemberLevelMapper.deleteUserMemberLevelById(id);
	}
}